package top.yxqz.spring.proxy.dynamicproxy;

import org.springframework.stereotype.Component;

/**
 * @author: 余小小
 * @date: 2023/4/13
 * @description：目标类
 */
@Component
public class CalculatorImpl implements Calculator {
    @Override
    public int add(int i, int j) {
        int result = i + j; //核心代码
        System.out.println("执行了add方法");
        return result;
    }

    @Override
    public int sub(int i, int j) {
        int result = i - j;
        return result;
    }

    @Override
    public int mul(int i, int j) {
        int result = i * j;
        return result;
    }

    @Override
    public int div(int i, int j) {
        return i / j;
    }
}
